<!-- Inicio codigo para el Google MAPS -->
<%= stylesheet_link_tag 'gmaps4rails' %>
<!-- Fin codigo para el Google MAPS -->
<p id="notice"><%= notice %></p>
<fieldset id="agrupacion" >
    <legend>Datos</legend>
   <fieldset class="column-right">
          <fieldset id="agrupacion" >
          <legend>Imagen</legend>
           <div class="field">            
              <a href=<%@cultural_heritage_incidence.avatar.url%> rel="lightbox[roadtrip]"><%= image_tag @cultural_heritage_incidence.avatar.url, :alt => "Cargando...", :width => 150, :height => 150, :title => "Imagen de Incidencia"%></a>
           </div>
           </fieldset>          
        </fieldset>

         <fieldset class="column-left">
          <fieldset id="agrupacion" >
          <legend>Datos Patrimonio Cultural</legend>
           <div class="field">
              <b>Patrimonio:</b>
              <%= @cultural_heritage_incidence.obj_cultural_heritage.name %>
              <br></br>
              <b>Dueño:</b>
           </div>
           </fieldset>
         </fieldset>

         <fieldset class="column-left">
          <fieldset id="agrupacion" >
          <legend>Descripción</legend>
           <div class="field">
              <b>Descripción breve:</b>
               <%= @cultural_heritage_incidence.briefDesc %>
              <br></br>
              <b>Descripción Completa:</b>
               <%= @cultural_heritage_incidence.completeDesc %>
           </div>
           </fieldset>
         </fieldset>


         <fieldset class="column-left">
          <fieldset id="agrupacion" >
          <legend>Datos Responsable Incidencia</legend>
           <div class="field">
              <b>DNI:</b>
               <%= @cultural_heritage_incidence.dniResponsable %>
              <br></br>
              <b>Nombre:</b>
               <%= @cultural_heritage_incidence.fullNameResponsable %>
           </div>
           </fieldset>
         </fieldset>

         <fieldset class="column-right">
          <fieldset id="agrupacion" >
          <legend>Lugar y Fecha</legend>
           <div class="field">
              <b>Fecha de Incidencia:</b>
               <%= @cultural_heritage_incidence.date_incidence %>
              <br></br>
              <b>Referencia Localización:</b>
               <%= @cultural_heritage_incidence.location %>
           </div>
           </fieldset>
         </fieldset>
  <%#*<b>Usuario :</b>%>
  <%#= @cultural_heritage_incidence.obj_user.name + " " + @cultural_heritage_incidence.obj_user.lastname %>

</fieldset>
<fieldset id="agrupacion" >
    <legend>Investigación Incidencia</legend>
         <%if !(@cultural_heritage_incidence.state.blank?)%>
            <%if @cultural_heritage_incidence.state ==3%>
                  <fieldset class="column-left">
                    <fieldset id="agrupacion" >
                    <legend>Experto del INC - Investigación Incidencia</legend>
                     <div class="field">
                        <b>Persona:</b>
                         <%= @cultural_heritage_incidence.obj_person1.name + " " +@cultural_heritage_incidence.obj_person1.lastname%>
                        <br></br>
                        <b>Correo:</b>
                         <%= @cultural_heritage_incidence.obj_person1.email%>
                        <br></br>
                        <b>Comentario:</b>
                         <%= @cultural_heritage_incidence.coment1 %>
                     </div>
                     </fieldset>
                   </fieldset>
            <%end%>

            <%if @cultural_heritage_incidence.state ==4%>
                  <fieldset class="column-left">
                    <fieldset id="agrupacion" >
                    <legend>Experto Legal - Investigación Incidencia</legend>
                     <div class="field">
                        <b>Persona:</b>
                         <%= @cultural_heritage_incidence.obj_person2.name + " " +@cultural_heritage_incidence.obj_person2.lastname%>
                        <br></br>
                        <b>Correo:</b>
                         <%= @cultural_heritage_incidence.obj_person2.email%>
                        <br></br>
                        <b>Comentario:</b>
                         <%= @cultural_heritage_incidence.coment2 %>
                     </div>
                     </fieldset>
                   </fieldset>
            <%end%>
         <%end%>
</fieldset>

<%if @cultural_heritage_incidence.gmaps == true %>
<fieldset id="agrupacion">
  <legend>Ubicación</legend>
  <%#= gmaps4rails(@json) %>
  <%= gmaps({
      "map_options" => { "type" => "HYBRID", "center_longitude" => 180, "zoom" => 7, "auto_adjust" => true},
      "markers"     => { "data" => @json,
                         #"options" => {"list_container" => "markers_list" }
                        }


    })%>
  <% if ! @cultural_heritage_incidence.address.blank? %>
    <p>
      <b>Dirección:</b>
      <%= @cultural_heritage_incidence.address %>
    </p>
    <%end%>
</fieldset>
<div id="lineaform"></div>
<%end%>


<%= link_to 'Editar', edit_cultural_heritage_incidence_path(@cultural_heritage_incidence) %> |
<%= link_to 'Regresar', cultural_heritage_incidences_path %> |
<%= link_to 'Exportar a PDF',{:controller => '/report/incidence_report', :action => 'pdf_export', :id => @cultural_heritage_incidence.id}%>
